package appcus

import (
	"counter-help/admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type AppCusOrderPayRouter struct{}

// InitAppCusOrderPayRouter 初始化 小程序微信支付路由
func (s *AppCusOrderPayRouter) InitAppCusOrderPayRouter(Router *gin.RouterGroup, pubRouter *gin.RouterGroup) {
	cusOrderPayRouter := Router.Group("appCusOrderPay").Use(middleware.OperationRecord())
	{
		cusOrderPayRouter.POST("pay", appOrderPayApi.AppOrderPay) // 微信支付
	}
	cusOrderNotifyRouter := pubRouter.Group("appCusOrderPay")
	{
		cusOrderNotifyRouter.POST("notify", appOrderPayApi.HandlePaymentNotification)     // 处理微信回调
		cusOrderNotifyRouter.POST("wxnotify", appOrderPayApi.HandleWxPaymentNotification) // 处理微信回调
	}
}
